Optimal. Leaf size=38 \[ \frac{B \sin (c+d x)}{d}+\frac{C \sin (c+d x) \cos (c+d x)}{2 d}+\frac{C x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.023467, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158, Rules used = {2637, 2635, 8} \[ \frac{B \sin (c+d x)}{d}+\frac{C \sin (c+d x) \cos (c+d x)}{2 d}+\frac{C x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx &=B \int \cos (c+d x) \, dx+C \int \cos ^2(c+d x) \, dx\\ &=\frac{B \sin (c+d x)}{d}+\frac{C \cos (c+d x) \sin (c+d x)}{2 d}+\frac{1}{2} C \int 1 \, dx\\ &=\frac{C x}{2}+\frac{B \sin (c+d x)}{d}+\frac{C \cos (c+d x) \sin (c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0614901, size = 35, normalized size = 0.92 \[ \frac{4 B \sin (c+d x)+C (2 (c+d x)+\sin (2 (c+d x)))}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.014, size = 40, normalized size = 1.1 \begin{align*}{\frac{B\sin \left ( dx+c \right ) }{d}}+{\frac{C}{d} \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.26855, size = 47, normalized size = 1.24 \begin{align*} \frac{{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C}{4 \, d} + \frac{B \sin \left (d x + c\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.5711, size = 72, normalized size = 1.89 \begin{align*} \frac{C d x +{\left (C \cos \left (d x + c\right ) + 2 \, B\right )} \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.352142, size = 63, normalized size = 1.66 \begin{align*} B \left (\begin{cases} \frac{\sin{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \cos{\left (c \right )} & \text{otherwise} \end{cases}\right ) + C \left (\begin{cases} \frac{x \sin ^{2}{\left (c + d x \right )}}{2} + \frac{x \cos ^{2}{\left (c + d x \right )}}{2} + \frac{\sin{\left (c + d x \right )} \cos{\left (c + d x \right )}}{2 d} & \text{for}\: d \neq 0 \\x \cos ^{2}{\left (c \right )} & \text{otherwise} \end{cases}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.24177, size = 43, normalized size = 1.13 \begin{align*} \frac{1}{4} \, C{\left (2 \, x + \frac{\sin \left (2 \, d x + 2 \, c\right )}{d}\right )} + \frac{B \sin \left (d x + c\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]